﻿using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x02000554 RID: 1364
	public class UI_ColorPresetsClick : MonoBehaviour, IPointerDownHandler, IEventSystemHandler
	{
		// Token: 0x17000439 RID: 1081
		// (get) Token: 0x060022CE RID: 8910 RVA: 0x000D224C File Offset: 0x000D044C
		private Image image
		{
			get
			{
				if (this._image == null)
				{
					this._image = base.GetComponent<Image>();
				}
				return this._image;
			}
		}

		// Token: 0x060022CF RID: 8911 RVA: 0x000D2274 File Offset: 0x000D0474
		public void OnPointerDown(PointerEventData ped)
		{
			if (null == this.colorMenu)
			{
				return;
			}
			int lr = -1;
			if (Input.GetMouseButtonDown(0))
			{
				lr = 0;
			}
			else if (Input.GetMouseButtonDown(1))
			{
				lr = 1;
			}
			this.colorMenu.OnPushPresetsCustomColor(this.image, lr);
		}

		// Token: 0x040023EA RID: 9194
		public UI_ColorMenu colorMenu;

		// Token: 0x040023EB RID: 9195
		private Image _image;
	}
}
